package com.gis507.mapreduce.design;

import com.gis507.mapreduce.AISBean.AisClassifyBean;
import com.gis507.mapreduce.Utils.UtilsClass;
import lombok.extern.slf4j.Slf4j;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

@Slf4j
public class AISInterpolationReducer extends Reducer<Text, AisClassifyBean,AisClassifyBean, NullWritable> {

//    //设定的最大时间
//    private static final double STANDTIME = 30;
//    private static final double MinTime = 30;
//    //设定的最大距离
//    private static final double STANDSTANCE = 1000;
//    private static int sum = 0;
    private double maxStance = 500;

    @Override
    protected void reduce(Text key, Iterable<AisClassifyBean> values, Context context) throws IOException, InterruptedException {

        for (AisClassifyBean value : values) {
            context.write(value,NullWritable.get());
        }

    }
}
